#ifndef     __PARTS_H
#define     __PARTS_H

#include "../../utils/object.h"
#include "../../utils/nocopyable.h"
#include <stdint.h>

namespace driver {

class Parts : private utils::NoCopyable {

public:
    Parts();

    void water_heat_ctrl(uint8_t value);
    void steam_heat_ctrl(uint8_t value);

    void water_pump_open();
    void water_pump_close();

    void clean_pump_open();
    void clean_pump_close();

    void water_valve_open();
    void water_valve_close();

    void clean_valve_open();
    void clean_valve_close();

    void steam_pump_open();
    void steam_pump_close();

    void steam_valve_open();
    void steam_valve_close();

    void bucket1_pump_open();
    void bucket1_pump_close();

    void bucket2_pump_open();
    void bucket2_pump_close();

    void ro_exit_valve_open();
    void ro_exit_valve_close();

    void ro_enter_valve_open();
    void ro_enter_valve_close();

    void stir_motor_open();
    void stir_motor_close();

    void drop_valve_open();
    void drop_valve_close();

    inline void water_heat_open() {
        water_heat_ctrl(100);
    }
    inline void water_heat_close() {
        water_heat_ctrl(0);
    }
    inline void steam_heat_open() {
        steam_heat_ctrl(100);
    }
    inline void steam_heat_close() {
        steam_heat_ctrl(0);
    }

    uint16_t status();
};

inline utils::Object<Parts> parts;

}

#endif
